<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    // 栈内存
    // JavaScript的原始类型并非对象类型,所以从理论上来说,它们是没有办法获取属性或者调用方法的。
    var name = "Hello World"
    var height = 1.88888

    console.log(name.length)
    console.log(name.split(" "))
    console.log(height.toFixed(2))


    // function String(str) {
    //   this.str = str
    //   this.length = 11
    //   this.split = function () { }
    // }


    var obj = {
      name: "kobe",
      running: function () { }
    }

    obj.running()

    var name1 = new String("Hello World")
    console.log(typeof name, typeof name1) // string object

  </script>
</body>

</html>